1. Field of the Invention
The present invention relates to a communication apparatus and a communication system.
2. Description of the Related Art
Conventionally, CAN (controller area network) communication has been known as a communication protocol between ECUs (electronic control units) such as an engine ECU and a motor ECU. In the CAN communication, various data transmitted or received between ECUs is transmitted using a communication line called a CAN bus. Such CAN communication is being widely used as a communication protocol which is low in cost and high in degree of freedom.
In the CAN communication, a master-slave relation is not decided, and instead a so-called multi-master system in which each ECU transmits data at an arbitrary timing is being employed. In case where the multi-master system is employed, data is simultaneously transmitted from a plurality of ECUs to a CAN bus, but a plurality of data is not present on one CAN bus at the same time. For this reason, in the CAN communication, in order to avoid a communication collision, communication mediation for giving a priority order to each data is performed, and then data transmission is performed in descending order of the priority order.
Further, in the CAN communication, when a transmission error of data occurs, a retransmitting process for retransmitting such data is performed. In recent years, a technique of stopping the retransmitting process when the retransmitting process is repeated during a predetermined time has been known. For example, in a technique disclosed in Japanese Patent Application Laid-Open No. 2010-147590, the retransmitting process is repeated until a transmission error is continued during a predetermined time. Then, when the predetermined time elapses, the transmission error is determined as a persistent error caused by a breakdown of an ECU or the like, and thus transmission of all data including retransmission data is stopped.
However, in the above described conventional technique, when ECUs repeat transmission and reception of data with a predetermined communication period, a situation in which data that has to be received within the communication period is not received within the communication period may occur if the retransmitting process is repeated.
Particularly, when data having a transmission error is high in a priority order, data having a priority order lower than the data is not transmitted while retransmission of the data is repeated. Thus, there is a high possibility that a situation in which data having a low priority order is not transmitted within the communication period will occur.
One aspect of an embodiment is aimed to provide a communication apparatus and communication system that can prevent a loss of data that has to be received in a predetermined communication period even when a transmission error occurs.